package com.college.controller;

import com.college.service.TeacherInfoService;
import com.college.teacherDTO.TeachInfoDTO;
import com.college.teacherDTO.TeacherPageOneDTO;
import com.college.utils.R;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 教师信息 前端控制器
 * </p>
 *
 * @author yoki
 * @since 2024-05-29
 */
@RestController
@RequestMapping("/teacherInfo")
public class TeacherInfoController {
    @Autowired
    private TeacherInfoService teacherInfoService;

    //该页面展示教师名称，教师职位，教师职称
    @ApiOperation("启动页")
    @GetMapping("/startPage")
    public R<TeacherPageOneDTO> startPage(Integer id)
    {
        return teacherInfoService.startPage(id);
    }


    //该页面展示教师入职时间
    @ApiOperation("我和重工页面")
    @GetMapping("/meAndCG")
    public R<String> meAndCG(Integer id)
    {
        return teacherInfoService.meAndCG(id);
    }

    //该页面显示教师所属的学院和专业
    @ApiOperation("档案信息页面")
    @GetMapping("/archivesInfo")
    public R<String> archivesInfo(Integer id)
    {
        return teacherInfoService.archivesInfo(id);
    }

    @ApiOperation("授课信息页面")
    @GetMapping("/teachInfo")
    public R<TeachInfoDTO> teachInfo(Integer id){return teacherInfoService.teachInfo(id);}

}

